﻿using System;
using System.Data.Linq.Mapping;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace EbbinghausWord.Entities
{
    /// <summary>
    /// 发音文件的数据类
    /// </summary>
    [Table]
    public class TableVoiceEntity : BaseTableEntity
    {
        private string _english;

        /// <summary>
        /// 英语
        /// </summary>
        [Column(IsPrimaryKey = true, IsDbGenerated = false, DbType = "NVarChar(200) NOT NULL",
           CanBeNull = false, AutoSync = AutoSync.Never)]
        public string English
        {
            get { return _english; }
            set
            {
                if (_english == value) return;

                NotifyPropertyChanging("English");
                _english = value;
                NotifyPropertyChanged("English");
            }
        }

        private byte[] _voice;
        [Column(DbType = "Image", UpdateCheck = UpdateCheck.Never)]
        public byte[] Voice
        {
            get { return _voice; }
            set
            {
                if (_voice == value) return;

                NotifyPropertyChanging("Voice");
                _voice = value;
                NotifyPropertyChanged("Voice");
            }
        }
    }
}
